<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>TCWeiboSDK: WeiboApi Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="icon.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">TCWeiboSDK
   &#160;<span id="projectnumber">LightVerisonV2.0</span>
   </div>
   <div id="projectbrief">腾讯微博开放接口SDK</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('interface_weibo_api.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Instance Methods</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_weibo_api-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">WeiboApi Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>定义了腾讯微博授权，api请求接口  
 <a href="interface_weibo_api.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for WeiboApi:</div>
<div class="dyncontent">
 <div class="center">
  <img src="interface_weibo_api.png" usemap="#WeiboApi_map" alt=""/>
  <map id="WeiboApi_map" name="WeiboApi_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Instance Methods</h2></td></tr>
<tr class="memitem:a8f1e910a9d7a1f6835a849eabeaa08bc"><td class="memItemLeft" align="right" valign="top">(id)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_weibo_api.html#a8f1e910a9d7a1f6835a849eabeaa08bc">initWithAppKey:andSecret:andRedirectUri:andAuthModeFlag:andCachePolicy:</a></td></tr>
<tr class="memdesc:a8f1e910a9d7a1f6835a849eabeaa08bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化WeiboApi对象  <a href="#a8f1e910a9d7a1f6835a849eabeaa08bc">More...</a><br/></td></tr>
<tr class="separator:a8f1e910a9d7a1f6835a849eabeaa08bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c472ac2761e4c73817320ba9b549100"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_weibo_api.html#a7c472ac2761e4c73817320ba9b549100">loginWithDelegate:andRootController:</a></td></tr>
<tr class="memdesc:a7c472ac2761e4c73817320ba9b549100"><td class="mdescLeft">&#160;</td><td class="mdescRight">使用SSO或者Webview开始授权，优先选择SSO  <a href="#a7c472ac2761e4c73817320ba9b549100">More...</a><br/></td></tr>
<tr class="separator:a7c472ac2761e4c73817320ba9b549100"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ab74c7c65125cf314263e7a7ef4a9c2"><td class="memItemLeft" align="right" valign="top">(int)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_weibo_api.html#a5ab74c7c65125cf314263e7a7ef4a9c2">requestWithParams:apiName:httpMethod:delegate:</a></td></tr>
<tr class="memdesc:a5ab74c7c65125cf314263e7a7ef4a9c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">发送api请求, 腾讯微博OPenApi请求都可以通过这个接口进行访问，如何调用请参考官网文档  <a href="#a5ab74c7c65125cf314263e7a7ef4a9c2">More...</a><br/></td></tr>
<tr class="separator:a5ab74c7c65125cf314263e7a7ef4a9c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec8b529e7b2e33b7cced2077195b9dd6"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_weibo_api.html#aec8b529e7b2e33b7cced2077195b9dd6">SetToken:</a></td></tr>
<tr class="memdesc:aec8b529e7b2e33b7cced2077195b9dd6"><td class="mdescLeft">&#160;</td><td class="mdescRight">使用已有授权信息授权进行初始化，比如第三方后台已经有用户授权，可以使用这种方式进行授权。ps 用户的新授权会覆盖老授权，导致老授权失效。  <a href="#aec8b529e7b2e33b7cced2077195b9dd6">More...</a><br/></td></tr>
<tr class="separator:aec8b529e7b2e33b7cced2077195b9dd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acff1e529673fe7da19e7bec11c5a94ac"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_weibo_api_object.html">WeiboApiObject</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_weibo_api.html#acff1e529673fe7da19e7bec11c5a94ac">getToken</a></td></tr>
<tr class="memdesc:acff1e529673fe7da19e7bec11c5a94ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取WeiboApiObject对象，当使用非苹果系统授权时，可以从中取出授权信息  <a href="#acff1e529673fe7da19e7bec11c5a94ac">More...</a><br/></td></tr>
<tr class="separator:acff1e529673fe7da19e7bec11c5a94ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a990a14ba53bb85109f04a36daa723f2c"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_weibo_api.html#a990a14ba53bb85109f04a36daa723f2c">cancelAuth</a></td></tr>
<tr class="memdesc:a990a14ba53bb85109f04a36daa723f2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">登出，清除授权的缓存信息，会清除掉cache中的缓存信息  <a href="#a990a14ba53bb85109f04a36daa723f2c">More...</a><br/></td></tr>
<tr class="separator:a990a14ba53bb85109f04a36daa723f2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30acc2a73ac30c0acfc55d0e8e02bc1b"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_weibo_api.html#a30acc2a73ac30c0acfc55d0e8e02bc1b">checkAuthValid:andDelegete:</a></td></tr>
<tr class="memdesc:a30acc2a73ac30c0acfc55d0e8e02bc1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断授权是否有效，包括是否已授权，授权是否已过期  <a href="#a30acc2a73ac30c0acfc55d0e8e02bc1b">More...</a><br/></td></tr>
<tr class="separator:a30acc2a73ac30c0acfc55d0e8e02bc1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77a481235be295ee6230f1821731c4aa"><td class="memItemLeft" align="right" valign="top">(BOOL)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_weibo_api.html#a77a481235be295ee6230f1821731c4aa">handleOpenURL:</a></td></tr>
<tr class="memdesc:a77a481235be295ee6230f1821731c4aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">处理微博客户端唤回后的回调数据  <a href="#a77a481235be295ee6230f1821731c4aa">More...</a><br/></td></tr>
<tr class="separator:a77a481235be295ee6230f1821731c4aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a4f78f9fd1fbb0ba5dd15bf2e1f70ab7a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="interface_weibo_api_object.html">WeiboApiObject</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_weibo_api.html#a4f78f9fd1fbb0ba5dd15bf2e1f70ab7a">weiboObj</a></td></tr>
<tr class="memdesc:a4f78f9fd1fbb0ba5dd15bf2e1f70ab7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">weiboapi的存储对象  <a href="#a4f78f9fd1fbb0ba5dd15bf2e1f70ab7a">More...</a><br/></td></tr>
<tr class="separator:a4f78f9fd1fbb0ba5dd15bf2e1f70ab7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b655ab748c7ce0d9098a12e9c54b922"><td class="memItemLeft" align="right" valign="top">NSMutableDictionary *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_weibo_api.html#a5b655ab748c7ce0d9098a12e9c54b922">reqDic</a></td></tr>
<tr class="memdesc:a5b655ab748c7ce0d9098a12e9c54b922"><td class="mdescLeft">&#160;</td><td class="mdescRight">请求连接字典  <a href="#a5b655ab748c7ce0d9098a12e9c54b922">More...</a><br/></td></tr>
<tr class="separator:a5b655ab748c7ce0d9098a12e9c54b922"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>定义了腾讯微博授权，api请求接口 </p>
<dl class="section note"><dt>Note</dt><dd>集成了webview授权，微博客户端的SSO授权，苹果系统的SSO授权，选择何种模式授权，请initWithAppKey中设置，默认支持三种模式 </dd>
<dd>
典型调用顺序 1. 初始化——&gt; 通过webview或者SSO授权WeiboApi对象——&gt;请求接口</dd></dl>
<dl class="section see"><dt>See Also</dt><dd>initWithAppKey: andSecret: andRedirectUri: andAuthModeFlag: andCachePolicy</dd>
<dd>
loginWithDelegate:theDelegate:andRootController</dd>
<dd>
requestWithParams:apiName:httpMethod:delegate </dd></dl>
<dl class="section note"><dt>Note</dt><dd>典型调用顺序 2. 初始化——&gt; 把已有token设置到对象中——&gt;请求接口delegate</dd></dl>
<dl class="section see"><dt>See Also</dt><dd>initWithAppKey:andSecret:andRedirectUri:andAuthModeFlag:andCachePolicy</dd>
<dd>
setToken:</dd>
<dd>
requestWithParams:apiName:httpMethod:delegate </dd></dl>
<dl class="section note"><dt>Note</dt><dd>授权优先级：SSO可用时，优先使用SSO进行授权，次选系统SSO登录，最后选择webview </dd>
<dd>
第一次授权时，如果苹果系统SSO授权不可用，sdk将会做记忆，后续不再选择此种授权机制。 </dd>
<dd>
重刷授权： 默认在之前检查授权有效性，如果授权无效，但是refreshtoken有效，则自动启用refresh机制进行重刷授权。</dd></dl>
<dl class="section see"><dt>See Also</dt><dd>loginWithDelegate:theDelegate:andRootController </dd></dl>
<dl class="section note"><dt>Note</dt><dd>SDk默认写本地缓存，第一次授权完成后，写入缓存。后续不需要再次进行授权，如需判断授权是否有效请</dd></dl>
<dl class="section see"><dt>See Also</dt><dd>checkAuthValid: </dd></dl>
<dl class="section note"><dt>Note</dt><dd>使用苹果系统SSO授权时，不提供获取token功能，其他两种授权方式时，请获取请调用getToken 获取授权票据。</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="interface_weibo_api.html#acff1e529673fe7da19e7bec11c5a94ac" title="获取WeiboApiObject对象，当使用非苹果系统授权时，可以从中取出授权信息">- getToken (WeiboApi)</a>: </dd></dl>
<dl class="section note"><dt>Note</dt><dd>客户端SSO授权时，所显示应用icon，是SDK从第三方应用工程plist种获取，请确保工程icon设置方式是标准设置方式。 </dd></dl>
</div><h2 class="groupheader">Method Documentation</h2>
<a class="anchor" id="a990a14ba53bb85109f04a36daa723f2c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) cancelAuth </td>
          <td></td>
          <td class="paramname"></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>登出，清除授权的缓存信息，会清除掉cache中的缓存信息 </p>
<dl class="section return"><dt>Returns</dt><dd>无返回 </dd></dl>

</div>
</div>
<a class="anchor" id="a30acc2a73ac30c0acfc55d0e8e02bc1b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) checkAuthValid: </td>
          <td></td>
          <td class="paramtype">(int)&#160;</td>
          <td class="paramname"><em>theCheckAuthFlag</em></td>
        </tr>
        <tr>
          <td class="paramkey">andDelegete:</td>
          <td></td>
          <td class="paramtype">(id)&#160;</td>
          <td class="paramname"><em>theDelegete</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>判断授权是否有效，包括是否已授权，授权是否已过期 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">INPUT</td><td>theCheckAuthFlag 检查授权信息策略，TCWBAuthCheckLocal，本地检查有效性；TCWBAuthCheckServer， 到服务器检查token有效性。 </td></tr>
    <tr><td class="paramname">INPUT</td><td>theDelegete 回调delegete </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>无返回 </dd></dl>

</div>
</div>
<a class="anchor" id="acff1e529673fe7da19e7bec11c5a94ac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="el" href="interface_weibo_api_object.html">WeiboApiObject</a> *) getToken </td>
          <td></td>
          <td class="paramname"></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取WeiboApiObject对象，当使用非苹果系统授权时，可以从中取出授权信息 </p>
<dl class="section return"><dt>Returns</dt><dd>返回授权信息对象 </dd></dl>

</div>
</div>
<a class="anchor" id="a77a481235be295ee6230f1821731c4aa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (BOOL) handleOpenURL: </td>
          <td></td>
          <td class="paramtype">(NSURL *)&#160;</td>
          <td class="paramname"><em>url</em></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>处理微博客户端唤回后的回调数据 </p>
<dl class="section note"><dt>Note</dt><dd>处理微博客户端通过URL启动App时传递的数据,需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用。 </dd>
<dd>
需同时在 URL Types 里面添加urlscheme wbxxxx,其中xxxx为注册应用时获得的appkey，如wb801213517 </dd>
<dd>
sourceApplication的来源可能是大写，也可能是小写（于iOS 系统版本有关），如果需要用这个参数判断来源，请做好兼容。 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">INPUT</td><td>url 启动App的URL </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>YES 成功返回 </dd>
<dd>
NO 失败返回 </dd></dl>

</div>
</div>
<a class="anchor" id="a8f1e910a9d7a1f6835a849eabeaa08bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (id) initWithAppKey: </td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>theAppkey</em></td>
        </tr>
        <tr>
          <td class="paramkey">andSecret:</td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>theSecret</em></td>
        </tr>
        <tr>
          <td class="paramkey">andRedirectUri:</td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>theRedirecturi</em></td>
        </tr>
        <tr>
          <td class="paramkey">andAuthModeFlag:</td>
          <td></td>
          <td class="paramtype">(int)&#160;</td>
          <td class="paramname"><em>theAuthModeFlag</em></td>
        </tr>
        <tr>
          <td class="paramkey">andCachePolicy:</td>
          <td></td>
          <td class="paramtype">(int)&#160;</td>
          <td class="paramname"><em>theCachePolicy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>初始化WeiboApi对象 </p>
<dl class="section note"><dt>Note</dt><dd>alloc weiboApi 对象后，授权之前，必须现进行初始化，否则将会出错 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">INPUT</td><td>theAppkey 申请应用时分配给第三方应用程序的App key, </td></tr>
    <tr><td class="paramname">INPUT</td><td>theSecret 申请应用时分配给第三方应用程序的App secrect, </td></tr>
    <tr><td class="paramname">INPUT</td><td>theRedirectUri 回调url </td></tr>
    <tr><td class="paramname">INPUT</td><td>theAuthModeFlag 兼容模式，按位或支持微博客户端SSO授权，苹果系统SocialFrameWork，webview授权。默认填0即可，3种模式都支持，模式定义见WBApiObject.h文件。 </td></tr>
    <tr><td class="paramname">INPUT</td><td>theCachePolicy 缓存兼容模式，默认填TCWBCachePolicyCacheFirst（0），优先从缓存中获取。TCWBCachePolicyServerFirst（1），优先从服务器获取，获取完毕覆盖本地缓存 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>id 生成的WeiboApi对象实例 </dd></dl>

</div>
</div>
<a class="anchor" id="a7c472ac2761e4c73817320ba9b549100"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) loginWithDelegate: </td>
          <td></td>
          <td class="paramtype">(id)&#160;</td>
          <td class="paramname"><em>theDelegate</em></td>
        </tr>
        <tr>
          <td class="paramkey">andRootController:</td>
          <td></td>
          <td class="paramtype">(UIViewController *)&#160;</td>
          <td class="paramname"><em>rootCtrl</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>使用SSO或者Webview开始授权，优先选择SSO </p>
<dl class="section note"><dt>Note</dt><dd>需实现WeiboAuthDelegate 中的DidAuthFinished 和 DidAuthCanceled DidAuthFailWithError </dd>
<dd>
需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用。</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="interface_weibo_api.html#a77a481235be295ee6230f1821731c4aa" title="处理微博客户端唤回后的回调数据">- handleOpenURL:</a> </dd></dl>
<dl class="section note"><dt>Note</dt><dd>必须再主线程调用，且提供窗口controller，否则会导致调用失败 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">INPUT</td><td>delegate 回调方法接收对象 </td></tr>
    <tr><td class="paramname">INPUT</td><td>rootCtrl 授权窗口的父窗口 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>无返回 </dd></dl>

</div>
</div>
<a class="anchor" id="a5ab74c7c65125cf314263e7a7ef4a9c2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (int) requestWithParams: </td>
          <td></td>
          <td class="paramtype">(NSMutableDictionary *)&#160;</td>
          <td class="paramname"><em>params</em></td>
        </tr>
        <tr>
          <td class="paramkey">apiName:</td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>apiName</em></td>
        </tr>
        <tr>
          <td class="paramkey">httpMethod:</td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>httpMethod</em></td>
        </tr>
        <tr>
          <td class="paramkey">delegate:</td>
          <td></td>
          <td class="paramtype">(id)&#160;</td>
          <td class="paramname"><em>delegate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>发送api请求, 腾讯微博OPenApi请求都可以通过这个接口进行访问，如何调用请参考官网文档 </p>
<dl class="section note"><dt>Note</dt><dd>授权应用信息使用当前weiboapi对象中的数据 </dd>
<dd>
需实现WeiboRequestDelegate 中的didReceiveRawData 和 didFailWithError </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">INPUT</td><td>params 请求参数对， key 为NSString类型的参数名， value 一般情况下为NSString 类型对象。发表图片时，value必须为NSData，或者UIImage对象。 </td></tr>
    <tr><td class="paramname">INPUT</td><td>apiName api名称，例如收听某人的url是https://open.t.qq.com/api/friends/add， 它的apiname就是 friends/add </td></tr>
    <tr><td class="paramname">INPUT</td><td>httpMethod GET or POST </td></tr>
    <tr><td class="paramname">INPUT</td><td>delegate 回调delegate 应实现WeiboRequestDelegate </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回请求序号,序号为递增。返回小于0的数字，则表示请求失败，失败原因可能是授权信息无效等。 </dd></dl>

</div>
</div>
<a class="anchor" id="aec8b529e7b2e33b7cced2077195b9dd6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) SetToken: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_weibo_api_object.html">WeiboApiObject</a> *)&#160;</td>
          <td class="paramname"><em>weiboObj</em></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>使用已有授权信息授权进行初始化，比如第三方后台已经有用户授权，可以使用这种方式进行授权。ps 用户的新授权会覆盖老授权，导致老授权失效。 </p>
<dl class="section note"><dt>Note</dt><dd>需实现WeiboAuthDelegate 中的DidAuthFinished 和 DidAuthCanceled DidAuthFailWithError </dd>
<dd>
需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用。</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="interface_weibo_api.html#a77a481235be295ee6230f1821731c4aa" title="处理微博客户端唤回后的回调数据">- handleOpenURL:</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">INPUT</td><td>weiboObj 其中AccessToken, expiretime，openid, refreshtoken必须设置 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>无返回 </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a5b655ab748c7ce0d9098a12e9c54b922"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">- (NSMutableDictionary*) reqDic</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>请求连接字典 </p>
<dl class="section note"><dt>Note</dt><dd>私有变量，开发不需要关心 </dd></dl>

</div>
</div>
<a class="anchor" id="a4f78f9fd1fbb0ba5dd15bf2e1f70ab7a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="el" href="interface_weibo_api_object.html">WeiboApiObject</a>*) weiboObj</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>weiboapi的存储对象 </p>
<dl class="section note"><dt>Note</dt><dd>私有变量，开发不需要关心 </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="interface_weibo_api.html">WeiboApi</a></li>
    <li class="footer">Generated on Wed Dec 25 2013 15:47:05 for TCWeiboSDK by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li>
  </ul>
</div>
</body>
</html>
